Field of the Invention
The present invention relates to a storage medium, a luminance computation apparatus, and a luminance computation method, and particularly to a technique for acceleration of a luminance computation in a real-time rendering.
Description of the Related Art
In the field of the computer graphics (CG) for computerized games, or the like, various methods have been proposed for reproducing an expression more realistically. One such method is a method in which an influence of a light source defined in a scene that is rendered, i.e. a luminance change of an object (a shading point) in the scene due to a light source defined in the scene in a screen that is rendered, is obtained by a so-called rendering equation that considers a bidirectional reflectance distribution function (BRDF) for an object.
Note that to improve a realism regarding a luminance of graphics that are rendered, a method that considers influences of a plurality of light sources (direct light sources) defined in a scene that is to be rendered, and of indirect light sources that further irradiate other objects due to a direct light source being reflected by an object arranged in the scene is employed. In this method, for each object rendered in respective pixels within an output screen, it is possible obtain a more correct luminance computation result by summing up influences of all light sources that may irradiate the object.
However, if it is necessary to perform rendering processing for a screen for each frame in real-time, such as for interactive moving image content, for example, it is possible that computing an influence of all of the light sources that may irradiate an object of a respective pixel for each of the pixels of the screen will result in a large a computation amount. For this reason, frame delays, processing failure, or the like may occur because it is impossible to complete the all rendering processing within a frame interval.
Meanwhile, in the real world, the influence of a light source reduces in accordance with the distance of the light source. For this reason, in graphics expressions in which realism is enhanced, for each light source that is defined, an attenuation function (a fall-off function) with a monotonic decrease such as one in which the intensity is reduced as the distance-to-arrival of the light is larger is set. Accordingly, even if the influence of all light sources is computed, a computation for a shading point existing at a distance for which the intensity at the time of arrival is not higher than a predetermined value will have a small influence on the screen that is rendered, and an effect that is worth the computation amount will not be achieved. In Ola Olsson et al., “Tiled Shading”, Journal of Graphics, GPU, and Game Tools, Vol. 15, No. 4, 2011, pp. 235-251, a method in which such light sources whose contribution to the shading point is small are excluded, effective areas for which a computation amount should be reduced are defined for each light source, and for each tile into which the screen that is generated is divided, only influences of light sources whose effective area is included in the tile are made to be targets of a luminance computation for pixels included in the tile (culling) is disclosed.
However, there is the possibility that because a fall-off function having an effective area of a light source as is described in Olsson et al. is normally defined by a graphic designer, the computation amount is not reduced by the definition. In particular, because the fall-off function, which is defined for a more realistic expression, is inversely proportional to the square of the distance, and is asymptotic at an infinite distance, an effective area is not defined, and so a computation amount cannot be reduced.
While it is possible to reduce a computation amount by, in response to this, employing a method (clamping) that sets the effective area forcibly, in such a case, there is the possibility that the luminance of particular objects in the screen will become lower, and that thereby it will become difficult for a viewer to see the scene, or that the luminance expression will not be as envisioned by the designer.